var net = require("net");
// 创建客户端口
const clinet = net.createConnection(
    {
        port:3000,
        host:"10.10.49.115"
    }
);
clinet.on("connect",()=>{
    console.log("客户端已连接");
})
clinet.on("error",()=>{
    console.log("出错了");
})
  //发送
  process.stdin.on("data",(data)=>{
    clinet.write(data);
});
//接收
clinet.on("data",(data)=>{
    console.log(data.toString().trim());
});